#include <iostream>

using namespace std;
int main(){
    int k;
    string n;
    string a[10]={"zero","one","two","three","four","five","six","seven","eight","nine"};
    for (int i=0; i<3;i++){
        cin >> n;
        for (int i=0; i<10; i++){
            if (n==a[i]){
                cout << i << " ";
                k++;
                break;
            }
        }
        if (k==0){
            cout << "Wrong Input";
            break;
        }
        k=0;
    }
    return 0;
}
